package com.qr.service.impl;

import com.qr.dao.IAccountDao;
import com.qr.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

//业务层表示
@Service("accountService")
public class AccountServiceImpl implements IAccountService {

    //注入
    @Autowired
    @Qualifier
    private IAccountDao accountDao;

    @Override
    public void saveAccount() {
        accountDao.saveAccount();
        System.out.println("保存账户");
    }

    @PostConstruct
    public void init(){
        System.out.println("初始化方法");
    }

    @PreDestroy
    public void destory(){
        System.out.println("销毁方法");
    }
}
